package com.cheng.service;

import com.cheng.common.exception.CommonException;
import com.cheng.data.entity.DepartmentEntity;
import com.cheng.data.vo.DepartmentVO;

import java.util.List;

/**
 * @author: ChengJW
 * @date: 2021/11/10 8:48
 * @version: 1.0
 * @description: 有关 department 部门信息表的操作
 */
public interface DepartmentService {

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: java.util.List<com.cheng.data.entity.DepartmentEntity>
    * @date: 2021/11/11
    * @description: 查询 department 列表信息
    */
    List<DepartmentEntity>  selectDepartmentInfo(DepartmentEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: []
    * @return: int
    * @date: 2021/11/11
    * @description: 新增部门信息
    */
    int insertDepartmentInfo(DepartmentEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/12
    * @description: 修改部门信息
    */
    int updateDepartmentInfo(DepartmentEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/12
    * @description: 删除部门信息
    */
    int deleteDepartmentInfo(DepartmentEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [dpTypeCode]
    * @return: java.lang.String
    * @date: 2021/11/14
    * @description: 根据部门编号查询部门名称
    */
    String queryDepartmentNmByCode(String dpTypeCode) throws CommonException;
}
